package com.tool_stdy.utils;

public class InternalClass {
	
	public static void main(String[] args) {
		T t = new T();
		t.say(null);
		t.say(new SayContent() {
			public void sayContent() {
				System.out.println("hello1");
			}
		});
		t.say(new SayContent() {
			public void sayContent() {
				System.out.println("hello2");
			}
		});
	}
}

interface SayContent {
	void sayContent();
}

class T {
	public void say(SayContent say) {
		if (say == null) {
			System.out.println("hello:T");
		} else {
			say.sayContent();
		}
	}
}